﻿using Cloud.Core.Data;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace Cloud.Entity
{
  
    [Serializable]
    /// <summary>
    /// 用户
    /// </summary>
    public class Sys_User : BaseEntity<int>
    {
        [Display(Name = "用户登录名")]
        [Required]
        [MaxLength(32, ErrorMessage = "{0}最长{1}位")]
        public string LoginName { get; set; }

        [Display(Name = "SaltKey")]
        [MaxLength(8, ErrorMessage = "{0}最长{1}位")]
        public string SaltKey { get; set; }

        [Required]
        [Display(Name = "密码")]
        [MaxLength(32, ErrorMessage = "{0}最长{1}位")]
        public string LoginPwd { get; set; }

        /// <summary>
        /// 0:未设置，1：男，2：女
        /// </summary>
        [Display(Name = "性别")]
        public int Sex { get; set; }

        [Display(Name = "用户姓名")] 
        [MaxLength(32, ErrorMessage = "{0}最长{1}位")]
        public string RelName { get; set; }

        [Display(Name = "昵称")]
        [MaxLength(32, ErrorMessage = "{0}最长{1}位")]
        public string NickName { get; set; }

        [Display(Name = "Email")]
        [MaxLength(32, ErrorMessage = "{0}最长{1}位")]
        public string Email { get; set; }

        [Display(Name = "手机号")]
        [MaxLength(11, ErrorMessage = "{0}最长{1}位")]
        public string Phone { get; set; }

        [Display(Name = "是否离职")]
        public bool IsDimission { get; set; }

        [Display(Name = "离职原因")]
        [MaxLength(128, ErrorMessage = "{0}最长{1}位")]
        public string DimissionReaSON { get; set; }
        [Display(Name = "是否是超级管理员")]
        public bool IsAdmin { get; set; }

    }
}